<?php
if (isset($_GET['B']) && $_GET['B'] !=""){
	$battleId = $_GET['B'];
}Else{
	echo "<h1 class='error'>Error: Page was expecting parameter 'B', BattleId</h1>";
}
if (isset($_GET['Bn']) && $_GET['Bn'] !=""){
	$battleName = $_GET['Bn'];
}Else{
	$battleName = "Unknown Battle";
}
if (isset($_GET['P']) && $_GET['P'] !=""){
	$playerId = $_GET['P'];
}Else{
	echo "<h1 class='error'>Error: Page was expecting parameter 'P', PlayerId</h1>";
}
if (isset($_GET['ts']) && $_GET['ts'] !=""){
	$lastTimeStamp = $_GET['ts'];
}Else{
	echo "<h1 class='error'>Error: Page was expecting parameter 'ts', Last polled server timestamp!</h1>";
}
?>

<h1>Battle '<?php echo $battleName; ?>' Staging Area</h1>
PlayerId: '<?php echo $playerId; ?>'
BattleId: '<?php echo $battleId; ?>'
ServerTs: '<?php echo $lastTimeStamp; ?>'
<br/>
<p>- Start Polling: This will fetch all data for populating the staging page.<br/>
Details including Chat, Settings, Player updates &amp; Game Start event</p>
<p>- Add Armarda selection</p>
<p>- Add Battle Settings for the host</p>
<p>- Make start game link only available to Host</p>
<p>- Player Ready flags</p>
<p>- Kick Player Buttons for Host</p>

<br/>
<br/>

<form name="host" action="site.php?" method="get">
<input type="hidden" name="c" value="GameEng" />
<input type="hidden" name="a" value="startBattle" />
<input type="hidden" name="B" value=<?php echo $battleId; ?> />
<input type="hidden" name="P" value=<?php echo $playerId; ?> />
<input type="submit" value="Start Battle" />
</form>